clearset more offset mem 40m#delimit ;log using "/Users/sebastian/Mac/UCSD/Debt/BCS/Replication Materials/table_3", replace text;use "/Users/sebastian/Mac/UCSD/Debt/BCS/Replication Materials/data_IO_2";generate ln_ajr=log(ajr_settmort);/* AUXILIARY EQUATION USING SETTLER MORTALITY (Appendix 2 - Model 1)*/;regress ln_gdp_cap ln_ajr  africa asia other, vce(robust) cluster(ccode);predict yhat_2;gen residuals_2=ln_gdp_cap-yhat_2;/* TABLE 3 - Model 1a */;heckman r_moodys chga_democurrentacctlag gdpcapgrowthlag residuals_2inflatwdi1 l_trade_gdp resourcelag default,select (rated_2=  chga_democurrentacctlag gdpcapgrowthlag residuals_2inflatwdi1 l_trade_gdp resourcelag default flow1 d1970-d2000) vce(robust) cluster(ccode) mills(lambda);drop lambda;/* TABLE 3 - MODEL 1b */;heckman r_moodys yhat_2currentacctlag gdpcapgrowthlag residuals_2inflatwdi1 l_trade_gdp resourcelag default,select (rated_2=  yhat_2currentacctlag gdpcapgrowthlag residuals_2inflatwdi1 l_trade_gdp resourcelag default flow1 d1970-d2000) vce(robust) cluster(ccode) mills(lambda);drop lambda;/* AUXILIARY EQUATION USING URBANIZATION (Appendix 2 - Model 2)*/;regress ln_gdp_cap urb1500 africa asia other, vce(robust) cluster(ccode);predict yhat_1;gen residuals_1=ln_gdp_cap-yhat_1;/* TABLE 3 - Model 2a */;heckman r_moodys chga_democurrentacctlag gdpcapgrowthlag residuals_1inflatwdi1 l_trade_gdp resourcelag default,select (rated_2=  chga_democurrentacctlag gdpcapgrowthlag residuals_1inflatwdi1 l_trade_gdp resourcelag default flow1 d1970-d2000) vce(robust) cluster(ccode) mills(lambda);drop lambda;/* TABLE 3 - Model 2b */;heckman r_moodys yhat_1currentacctlag gdpcapgrowthlag residuals_1inflatwdi1 l_trade_gdp resourcelag default,select (rated_2=  yhat_1currentacctlag gdpcapgrowthlag residuals_1inflatwdi1 l_trade_gdp resourcelag default flow1 d1970-d2000) vce(robust) cluster(ccode) mills(lambda);log c; 